#include<unordered_map>
#include<vector>
using namespace std;
class Solution {
public:
    bool containsDuplicate(vector<int>& nums) {
        unordered_map<int, int>hash;
        for (int& e : nums)
        {

            if (hash[e])return true;
            hash[e]++;
        }
        return false;
    }
};